<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>APP</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <style>
        body,html{
            background: #FFF;
        }
        #main{
            padding: 0.75em;
            position: relative;
        }
        
        .search-tags-container{

        }
        .search-tags{
            float: left;
            height: 31px;
            border: 1px solid #CCC;
            padding: 0 0.9em;
            color: #666666;
            line-height: 31px;
            margin-right: 0.9em;
            margin-bottom: 0.75em;
        }
    </style>
</head>
<body>
    <div id="wrap">
        <div id="main">
            <div class="search-tags-container clearfix">
                <span class="search-tags">花花公子</span>
                <span class="search-tags">半指手套</span>
                <span class="search-tags">软笔</span>
                <span class="search-tags">cherry机械键盘</span>
            </div> 
        </div>
    </div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript">

    var changeSearchResult = function(){
        var arr = [];
        var arr2 = ['<span class="search-tags">花花公子</span>','<span class="search-tags">半指手套</span>','<span class="search-tags">软笔</span>','<span class="search-tags">cherry机械键盘</span>'];
        var len = arr2.length;
        var str = '';
        for (var i = 0; i < len; i++) {
            arr.push(arr2.splice(Math.random()*arr2.length, 1));
        }
        for (var j = 0; j < len; j++) {
            str += arr[j][0];
        }
        $api.html($api.dom('.search-tags-container'),str);
    };
    apiready = function(){

    }
</script>
</html>